home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
programr
/
adoc2140.zip
/
CLEANDIR.BA_
/
CLEANDIR.BA
Wrap
Text File
|
1994-07-31
|
2KB
|
59 lines
REM This example shows how batch files can be documented. Note that both
REM types of comment prefixes (REM and :::) are used.
::: @CHAPTER:BATCH
::: @FILE CLEANDIR.BAT
::: @USAGE cleandir directory [file-mask]
::: @DESCRIPTION This batch file is used to clean-out the directories which
::: comprise the AutoDoc build structure.
::: @PARAM directory DOSPATH
::: This parameter is the path to the directory which is to
::: be 'cleaned'.
REM @PARAM file-mask DOSFILENAME
REM This parameter, which is optional, specifies a particular
REM file or set of files to be deleted. It may contain
REM the wildcard characters * and ?. If this parameter is not
REM specified, a full 'cleaning' is executed.
REM @END
@echo ===== Cleaning out %1 =====
if not exist %1\NUL goto noDir
cd %1 > c:\NUL
:::
::: See if the user specified what's to be deleted
if not "%2" == "" goto delParams
:::
::: User didn't say what to delete so nail everything
del *.obj > C:\NUL
del *.rsp > C:\NUL
del 0*. > C:\NUL
del *.err > C:\NUL
del *.hlp > c:\NUL
del *.pch > c:\NUL
del *.pmk > c:\NUL
if exist putall.bat del putall.bat > c:\NUL
if exist %1.res del *.res > C:\NUL
if exist %1.dll del *.dll > C:\NUL
if exist %1.exe del *.exe > C:\NUL
if exist %1.map del *.map > c:\NUL
if exist %1.lib del *.lib > c:\NUL
if exist %1.bak del *.bak > c:\NUL
if exist msvc.pdb del *.pdb > c:\NUL
if exist %1.sbr del *.sbr > c:\NUL
if exist %1.bsc del *.bsc > c:\NUL
if exist %1.bsc del *.aps > c:\NUL
goto exit
:::
::: We get here if the caller supplied some set of files to be deleted
::: (ie, *.obj). So, loop until %2 is empty.
:delParams
if "%2" == "" goto exit
del %2 > c:\NUL
shift
goto delParams
:exit
cd ..
:noDir